package com.nmbb.vlc.util;

import android.os.Handler;
import android.os.Message;
import android.util.Log;

import java.net.HttpURLConnection;
import java.net.URL;

/**
 * Created by yt-010 on 2016/8/23.
 */
public class HttpUtils {
//
//    private static Handler handler = new Handler() {
//        @Override
//        public void handleMessage(Message msg) {
//            super.handleMessage(msg);
//            switch (msg.what) {
//                case 0:
//                    ToastUtils.simpleToast("live ready");
//                    break;
//            }
//        }
//    };

    public static void get(String path) {
        try {
            URL uri = new URL(path);
            HttpURLConnection conn = (HttpURLConnection) uri.openConnection();
            if (conn.getResponseCode() == 200) {
                Log.i("HttpUtils", "-----ok");
//                handler.sendEmptyMessage(0);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
